/*                          UX-Framework                               
 *                                                                 
 *  iZE Co.,Ltd. Copyright 2009 All rights reserved.          
 *  This file is distributed under the terms of the GNU Lesser 
 *  General Public License, described in file LICENSE.                                     
 */
package jp.ize.ux.interactions;

// {{{ imports
import jp.ize.ux.geom.UXPoint;
import jp.ize.ux.states.UXBasicState;
import jp.ize.ux.events.UXMouseEvent;
import jp.ize.ux.UXInteraction;
import flash.events.MouseEvent;
// }}}
// {{{ class UXLeftThanCenterInteraction extends UXInteraction<UXListState>
/**
 * UXLeftThanCenterInteraction クラス<br>
 * インタラクションです。
 */
class UXLeftThanCenterInteraction extends UXInteraction<UXListState>
{
	// {{{ public function new()
	/**
	 * コンストラクタです。
	 */
	public function new( center:UXPoint ) : Void
	{
		super();
		name = "LeftThanCenter";
		judge = function (s) {
			var flag:Bool = false;
			var m:MouseEvent = Reflect.field(s,"mouse");
			if ( m.stageX<center.x ) {
				flag = true;
			} else {
				flag = false;
			}
			return flag;
		}
	}
	// }}}
}
// }}}
